home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / SRC / QLIB / INT.ASM < prev    next >
Assembly Source File  |  1996-12-17  |  876b  |  60 lines

  1. include qlib.inc
  2. include dos.inc
  3.  
  4. .code
  5. getint proc,v:byte
  6.   pushad
  7.   mov ax,204h
  8.   mov bl,v
  9.   int 31h
  10.   mov [esp+7*4],cx   ;ax
  11.   mov [esp+5*4],edx  ;edx
  12.   popad
  13.   ret
  14. getint endp ;ax:edx = vector
  15.  
  16. setint proc,v:byte,s:word,off:dword
  17.   pushad
  18.   mov ax,205h
  19.   mov bl,v
  20.   mov cx,s
  21.   mov edx,off
  22.   int 31h
  23.   jc notgood
  24.   popad
  25.   xor eax,eax
  26.   ret
  27. notgood:
  28.   popad
  29.   mov eax,ERROR
  30.   ret
  31. setint endp ;ax=0
  32.  
  33. getrmint proc uses ebx,v:byte
  34.   movzx ebx,v
  35.   shl ebx,2
  36.   xor edx,edx
  37.   xor eax,eax
  38.   cli
  39.   mov dx,[ebx]   ;offset   ;FIXED V1.2 : was using eax after I loaded it
  40.   mov ax,[ebx+2] ;seg
  41.   sti
  42.   ret
  43. getrmint endp  ;ax:dx = vektor
  44.  
  45. setrmint proc uses ebx,v:byte,s:word,off:word
  46.   movzx eax,v
  47.   shl eax,2   ;*4
  48.   cli
  49.   mov bx,off
  50.   mov [eax],bx
  51.   mov bx,s
  52.   mov [eax+2],bx
  53.   sti
  54.   xor eax,eax
  55.   ret
  56. setrmint endp
  57.  
  58. end
  59.  
  60.